#include <stdio.h>
#include <math.h>
#include "cv.h"
#include "highgui.h"

#define OROWS 3
#define OCOLS 9
#define VROWS 9
#define VCOLS 3

#define LEFT 0
#define RIGHT 1

#define BLACK 0
#define WHITE 255


IplImage* takeOeliminateV(IplImage* image_in, int LimitMAX,int LimitMIN,int windowLimitUp);
IplImage* binarizzazione(IplImage* image_in);
IplImage* scaleImage(IplImage* image_in,int scale,bool color);
IplImage* colorBorderAndScale(IplImage* image_in,IplImage* image_border,int border);
IplImage* takeOnlyInside(IplImage* image_in,int h1,int h2,int w1,int w2);
int windowLimits(IplImage* image_in,int mode);
int windowLimits(IplImage* image_in,int mode,int windowLimitUp);
IplImage* takeBorder(IplImage* image_in);
double liquid_level(IplImage* image_in);
int labeling(IplImage* image_in,IplImage* image_out);
IplImage* findMostImportant(IplImage* image_in);
double correctValues(int* countValues, int base_width, double meanValue);